export const qualificationOption = function () {
  return {
    refreshBtn: true,
    columnBtn: true,
    border: true,
    stripe: true,
    index: true,
    editBtn: true,
    delBtn: true,
    align: 'center',
    addBtn: !['view'].includes(this.type),
    menu: !['view'].includes(this.type),
    indexLabel: '序号',
    labelWidth: 120,
    column: [
      {
        label: '资质名称',
        prop: 'name',
        maxlength: 20,
        span: 12,
        rules: [
          {
            required: true,
            message: '请输入资质名称',
            trigger: 'blur'
          }
        ],
        slot: this.slotFlg
      },
      {
        label: '认证机构',
        prop: 'certificationAuthority',
        maxlength: 20,
        span: 12
      },
      {
        label: '签发日期',
        prop: 'signDate',
        type: 'date',
        pickerOptions: {
          disabledDate: data => data.getTime() < new Date(this.form.validDate).getTime()
        },
        span: 12,
        slot: this.slotFlg
      },
      {
        label: '有效期至',
        prop: 'validDate',
        type: 'date',
        pickerOptions: {
          disabledDate: data => data.getTime() < new Date(this.form.signDate).getTime()
        },
        span: 12,
        slot: this.slotFlg
      },
      {
        label: '附件',
        prop: 'attachments',
        type: 'upload',
        slot: true,
        formSlot: true,
        span: 24
      }
    ]
  }
}
